<div class = "full_width">
<h3>Danh sách bình luận</h3>
<p>
<?php
	echo $this->Paginator->counter(array(
	'format' => __('Có tất cả %count% bình luận', true)
	));
?>	
</p>
<table>
	<tr>
		<th>STT</th>
		<th><?php echo $this->Paginator->sort('Nội dung','Comment.content'); ?></th>
		<th><?php echo $this->Paginator->sort('Người viết','User.username'); ?></th>
		<th><?php echo $this->Paginator->sort('Bài viết','Post.title'); ?></th>
		<th><?php echo $this->Paginator->sort('Thời gian','Comment.created'); ?></th>
		<th>Thao tác</th>
	</tr>
	<?php 
		$i = 1;
		foreach ($comments as $comment): 
	?>
	<tr>
		<td><?php echo $i++; ?></td>
		<td><?php echo $comment['Comment']['content']; ?></td>
		<td><?php echo $comment['User']['username']; ?></td>
		<td><?php echo $comment['Post']['title']; ?></td>
		<td><?php echo $comment['Comment']['created']; ?></td>
		<td>
			<?php echo $this->Html->link($html->image('admin/icons/delete.png'), array('action' => 'delete', $comment['Comment']['id']), array('escape' => false, 'title' => 'Xóa bình luận'), sprintf(__('Bạn có chắc muốn xóa bình luận [%s]?', true), $i-1)); ?>
		</td>
	</tr>
	<?php endforeach; ?>
</table>
<p>
<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%', true)
	));
?>	
</p>

<div class="paging">
	<?php echo $this->Paginator->prev('<< ' . __('Trở lại', true), array(), null, array('class'=>'disabled'));?>
	| 	
	<?php echo $this->Paginator->numbers();?>
	|
	<?php echo $this->Paginator->next(__('Tiếp', true) . ' >>', array(), null, array('class' => 'disabled'));?>
</div>
</div>